package redis

import (
	"fmt"
	"github.com/go-redis/redis/v8"
	"goods_srv/appconfig"
)

var Rdb *redis.Client

func ExampleClient() {
	var Cons = appconfig.Con.Redis
	Rdb = redis.NewClient(&redis.Options{
		Addr:     Cons.Addr,
		Password: Cons.Password, // no password set
		DB:       Cons.DB,       // use default DB
	})
	fmt.Println(Cons)
	fmt.Println("redis连接成功")
}
